package Java.BlackHorse.IO.ObjectStream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class IODemo2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
//        创建对象输入流
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("IO\\ObjectStream\\student.txt"));
//      方法 readObject()  读取对象
        Object o =ois.readObject();
        System.out.println(o);
        ois.close();
    }
}
